(global.webpackJsonp = global.webpackJsonp || []).push([ [ "wjyk_recycle/pages/order/order" ], {
    "0962": function(e, t, n) {},
    "1e41": function(e, r, o) {
        (function(c) {
            Object.defineProperty(r, "__esModule", {
                value: !0
            }), r.default = void 0;
            var e, s = (e = o("4795")) && e.__esModule ? e : {
                default: e
            };
            function l(e, t, n, r, o, c, s) {
                try {
                    var i = e[c](s), l = i.value;
                } catch (e) {
                    return n(e), 0;
                }
                i.done ? t(l) : Promise.resolve(l).then(r, o);
            }
            function t(i) {
                return function() {
                    var e = this, s = arguments;
                    return new Promise(function(t, n) {
                        var r = i.apply(e, s);
                        function o(e) {
                            l(r, t, n, o, c, "next", e);
                        }
                        function c(e) {
                            l(r, t, n, o, c, "throw", e);
                        }
                        o(void 0);
                    });
                };
            }
            var n = {
                data: function() {
                    return {
                        pic_url: this.$imgUrl,
                        currentIndex: 0,
                        navArr: [ {
                            title: "待回收"
                        }, {
                            title: "已回收"
                        }, {
                            title: "待打包"
                        }, {
                            title: "已完成"
                        } ],
                        collectorid: "",
                        orders: [],
                        isPacked: !1,
                        selectId: [],
                        unit: "",
                        qrcode: ""
                    };
                },
                onShow: function() {
                    this.orders = [], this.mescroll.resetUpScroll();
                },
                onLoad: function(e) {
                    this.collectorid = e.collectorid, this.currentIndex = e.index, this.unit = c.getStorageSync("name");
                },
                methods: {
                    open: function(e) {
                        this.qrcode = e, console.log("qrcode", this.qrcode), this.$refs.success.show({
                            style: "background-color:#fff;width:400rpx;border-radius:20rpx;"
                        });
                    },
                    close: function() {
                        this.$refs.success.close();
                    },
                    packed: function() {
                        if (this.isPacked = !this.isPacked, !this.isPacked) {
                            for (var e = 0; e < this.orders.length; e++) this.orders[e].selectIndex && (this.selectId.push(this.orders[e].id), 
                            console.log("this.selectId", this.selectId));
                            0 != this.selectId.length && this.collectorPackOrder();
                        }
                    },
                    collectorPackOrder: function() {
                        var n = this;
                        return t(s.default.mark(function e() {
                            var t;
                            return s.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return e.next = 2, n.$http({
                                        url: n.$api.collectorPackOrder,
                                        data: {
                                            orderids: n.selectId.join(","),
                                            collectorid: n.collectorid
                                        }
                                    });

                                  case 2:
                                    t = e.sent, console.log("回收员打包订单", t), 0 == t.errno && c.showModal({
                                        title: "提示",
                                        showCancel: !1,
                                        content: t.message,
                                        success: function(e) {
                                            if (e.confirm) n.currentIndex = 2, n.selectId = [], n.orders = [], n.mescroll.resetUpScroll(); else if (e.cancel) return;
                                        }
                                    });

                                  case 5:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))();
                    },
                    changeSelect: function(e) {
                        for (var t = 0; t < this.orders.length; t++) if (this.orders[t].id === e) {
                            console.log(this.orders[t].selectIndex, !this.orders[t].selectIndex), this.$set(this.orders[t], "selectIndex", !this.orders[t].selectIndex);
                            break;
                        }
                    },
                    navbarTapHandler: function(e) {
                        this.currentIndex = e, this.isPacked = !1, console.log("11111111111111", this.currentIndex, e), 
                        this.orders = [], this.mescroll.resetUpScroll();
                    },
                    order: function(e) {
                        0 == this.currentIndex ? c.navigateTo({
                            url: "../pending-recycling-details/pending-recycling-details?orderid=" + e
                        }) : c.navigateTo({
                            url: "../details-verified/details-verified?title=已回收详情&orderid=" + e
                        });
                    },
                    upCallback: function(n) {
                        var r = this;
                        return t(s.default.mark(function e() {
                            var t;
                            return s.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return e.next = 2, r.$http({
                                        url: r.$api.collectorReserveLog,
                                        data: {
                                            collectorid: r.collectorid,
                                            is_status: Number(r.currentIndex) + 1,
                                            page: n.num,
                                            psize: 5
                                        }
                                    });

                                  case 2:
                                    0 == (t = e.sent).errno && (console.log("回收员订单", t.data), r.mescroll.endByPage(t.data.list.length, t.totalPage), 
                                    1 == n.num && (r.orders = []), r.orders = r.orders.concat(t.data.list));

                                  case 4:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))();
                    },
                    recycleConfirm: function(e, t, n) {
                        console.log("回收确认", e), c.navigateTo({
                            url: "../recycle-confirm/recycle-confirm?orderid=" + e + "&collectorid=" + t + "&partnerid=" + n
                        });
                    },
                    reserveCancel: function(r) {
                        var o = this;
                        return t(s.default.mark(function e() {
                            var t, n;
                            return s.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return t = o, e.next = 3, o.$http({
                                        url: o.$api.reserveCancel,
                                        data: {
                                            id: r
                                        }
                                    });

                                  case 3:
                                    0 == (n = e.sent).errno && c.showModal({
                                        title: "提示",
                                        showCancel: !1,
                                        content: n.message,
                                        success: function(e) {
                                            if (e.confirm) t.orders = [], t.mescroll.resetUpScroll(); else if (e.cancel) return;
                                        }
                                    });

                                  case 5:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))();
                    },
                    callPhone: function(e) {
                        this.$sun.phone(e);
                    }
                }
            };
            r.default = n;
        }).call(this, o("543d").default);
    },
    5843: function(e, t, n) {
        var r = n("0962");
        n.n(r).a;
    },
    "612a": function(e, t, n) {
        n.r(t);
        var r, o = n("1e41"), c = n.n(o);
        for (r in o) "default" !== r && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(r);
        t.default = c.a;
    },
    be70: function(e, t, n) {
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            n("8163"), t(n("66fd")), e(t(n("fe74")).default);
        }).call(this, n("543d").createPage);
    },
    d77e: function(e, t, n) {
        function r() {
            this.$createElement, this._self._c;
        }
        var o = {
            sunuiTab: function() {
                return n.e("components/sunui-tab/sunui-tab").then(n.bind(null, "a269"));
            },
            sunuiPopup: function() {
                return n.e("components/sunui-popup/sunui-popup").then(n.bind(null, "c2fe"));
            }
        }, c = [];
        n.d(t, "b", function() {
            return r;
        }), n.d(t, "c", function() {
            return c;
        }), n.d(t, "a", function() {
            return o;
        });
    },
    fe74: function(e, t, n) {
        n.r(t);
        var r, o = n("d77e"), c = n("612a");
        for (r in c) "default" !== r && function(e) {
            n.d(t, e, function() {
                return c[e];
            });
        }(r);
        n("5843");
        var s = n("f0c5"), o = Object(s.a)(c.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        t.default = o.exports;
    }
}, [ [ "be70", "common/runtime", "common/vendor" ] ] ]);